package com.mce.nebula.entity;

import com.mce.nebula.common.BaseEntity;
import jakarta.persistence.*;
import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 * 云市应用版本实体，对应Python的RainbondCenterAppVersion模型
 */
@Data
@EqualsAndHashCode(callSuper = true)
@Entity
@Table(name = "rainbond_center_app_version")
public class RainbondCenterAppVersion extends BaseEntity {
    
    @Column(name = "enterprise_id", length = 32)
    private String enterpriseId = "public";
    
    @Column(name = "app_id", length = 32, nullable = false)
    private String appId;
    
    @Column(name = "version", length = 32, nullable = false)
    private String version;
    
    @Column(name = "version_alias", length = 64)
    private String versionAlias = "NA";
    
    @Column(name = "app_version_info", length = 255, nullable = false)
    private String appVersionInfo;
    
    @Column(name = "record_id", nullable = false)
    private Integer recordId;
    
    @Column(name = "share_user", nullable = false)
    private Integer shareUser;
    
    @Column(name = "share_team", length = 64, nullable = false)
    private String shareTeam;
    
    @Column(name = "group_id", nullable = false)
    private Integer groupId = 0;
    
    @Column(name = "dev_status", length = 32)
    private String devStatus;
    
    @Column(name = "source", length = 15)
    private String source;
    
    @Column(name = "scope", length = 15)
    private String scope;
    
    @Column(name = "app_template", columnDefinition = "TEXT", nullable = false)
    private String appTemplate;
    
    @Column(name = "template_version", length = 10)
    private String templateVersion = "v2";
    
    @Column(name = "upgrade_time", length = 30)
    private String upgradeTime;
    
    @Column(name = "install_number", nullable = false)
    private Integer installNumber = 0;
    
    @Column(name = "is_official", nullable = false)
    private Boolean isOfficial = false;
    
    @Column(name = "is_ingerit", nullable = false)
    private Boolean isIngerit = true;
    
    @Column(name = "is_complete", nullable = false)
    private Boolean isComplete = false;
    
    @Column(name = "template_type", length = 32)
    private String templateType;
    
    @Column(name = "release_user_id")
    private Integer releaseUserId;
    
    @Column(name = "region_name", length = 64)
    private String regionName;
    
    @Column(name = "is_plugin", nullable = false)
    private Boolean isPlugin = false;
    
    @Column(name = "arch", length = 32)
    private String arch = "amd64";
}